package com.lxmes.gs.domain;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import com.lxmes.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 成本统计对象 gs_cost_summary
 * 
 * @author wdf
 * @date 2023-04-24
 */
@Data
@TableName("gs_cost_summary")
public class CostSummary{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 项目编号 */
    @TableField(value = "project_code",condition = SqlCondition.LIKE)
    private String projectCode;

    /** 项目名称 */
    @TableField(value = "project_name",condition = SqlCondition.LIKE)
    private String projectName;

    /** 统计类型 */
    @TableField(value = "summary_type")
    private String summaryType;

    /** 材料成本 */
    @TableField(value = "material_cost")
    private Double materialCost;

    /** 劳务成本 */
    @TableField(value = "labor_cost")
    private Double laborCost;

    /** 租赁成本 */
    @TableField(value = "leasing_cost")
    private Double leasingCost;

    /** 分包成本 */
    @TableField(value = "subcontracting_cost")
    private Double subcontractingCost;

    /** 间接成本 */
    @TableField(value = "indirect_cost")
    private Double indirectCost;

    /** 总成本 */
    @TableField(value = "total_cost")
    private Double totalCost;

    /** 备注 */
    @TableField(value = "remark")
    private String remark;


    public void calculateTotalCost() {
        this.totalCost = materialCost + laborCost + leasingCost + subcontractingCost+indirectCost;
    }
}
